
************************************************************************************************************************************************************************************************************************** 
************************************************************************************************************************************************************************************************************************** 
*************************************************************************************** MEANS COMPARISON ***************************************************************************************************************** **************************************************************************************************************************************************************************************************************************
************************************************************************************************************************************************************************************************************************** 


*** Figure 1: Time Trends in Violence Pre and Post-Lockdowns (Calendar Trends)**

use "Brancati_calendartrends.dta"

*Pre-Lockdown/Lockdown
egen mean1= mean(rebelattk_isodly), by(calendar1)
twoway (line mean1 calendar1 if calendar1 >=-120 & calendar1 <=120, sort), ytitle(`"mean number of nonstate actor violent events (daily)"') xtitle(`"days"') xline(0, extend) scheme(s1mono)

**Time Before Lock Lifted/Time After Lockdown Lifed (Lockdown/Post-Lockdown). 
egen mean2= mean(rebelattk_isodly), by(calendar3)
twoway (line mean2 calendar3 if calendar3 >=-120 & calendar2 <=120, sort), ytitle(`"mean number of nonstate actor violent events (daily)"') xtitle(`"days"') xline(0, extend) scheme(s1mono)

